/*=+--+=#=+--     Unmanned Aerial System Management Software      --+=#=+--+=#*\
|          Copyright (C) 2011 Regents of the University of Colorado.           |
|                             All Rights Reserved.                             |

     This program is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License version 2 as
     published by the Free Software Foundation.

     This program is distributed in the hope that it will be useful,
     but WITHOUT ANY WARRANTY; without even the implied warranty of
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.

     You should have received a copy of the GNU General Public License
     along with this program.  If not, see <http://www.gnu.org/licenses/>.

            Jack Elston                       Cory Dixon                        
|           elstonj@colorado.edu              dixonc@colorado.edu              |
|                                                                              |
\*=+--+=#=+--                 --+=#=+--+=#=+--                    --+=#=+--+=#*/

/*!
  \file networkAppliance.h
  \brief 

  \author Jack Elston
  $Date: 2006/10/25 13:34:45 $
*/

#ifndef __NETWORKAPPLIANCE_H
#define __NETWORKAPPLIANCE_H

#include <unistd.h>
#include <signal.h>
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <fcntl.h>
#include <math.h>

#include "String.h"
#include "type_defs.h"
#include "interface.h"
#include "dataDistribution.h"

/*<-------Defines--------->*/
/*<------End Defines------>*/

/************************************************************\
|                      NetworkAppliance                      |
\************************************************************/
/*!
  \class NetworkAppliance
  \brief 
*/
class NetworkAppliance
{
	private:
		String name;
		Interface * interfaces[MAX_INTERFACES];
		int num_interfaces;

		/*! \brief struct shared between the threads. */
		ShmStruct shm;

		Data_Distribution dataDist;

	public:
		NetworkAppliance(String a_name);
		~NetworkAppliance();

		void link(Interface * iface);

		void setMyIP();

		void start();
		void stop();
};

#endif //define
